# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1279200962.2510271
_template_filename=u'/pas/python/web/pylons/blog/blog/templates/user/base.mako'
_template_uri=u'/user/base.mako'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = ['header', 'footer', 'js', 'title']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    pass
def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'../base.mako', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        next = context.get('next', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n')
        # SOURCE LINE 9
        __M_writer(u'\n')
        # SOURCE LINE 11
        __M_writer(u'\n')
        # SOURCE LINE 14
        __M_writer(u'\n')
        # SOURCE LINE 31
        __M_writer(u'\n')
        # SOURCE LINE 32
        __M_writer(escape(next.body()))
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_header(context):
    context.caller_stack._push_frame()
    try:
        h = context.get('h', UNDEFINED)
        str = context.get('str', UNDEFINED)
        flahes = context.get('flahes', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 15
        __M_writer(u'\n    ')
        # SOURCE LINE 16
        flashes = h.flash.pop_messages() 
        
        __M_writer(u'\n    <div id="flahses">\n        <span class="message">\n')
        # SOURCE LINE 19
        if flahes :
            # SOURCE LINE 20
            for flash in flashes :
                # SOURCE LINE 21
                if flash :
                    # SOURCE LINE 22
                    __M_writer(u'                        ')
                    name=str(flash).strip().replace(' ','_') 
                    
                    __M_writer(u'\n                        <div id="flash_')
                    # SOURCE LINE 23
                    __M_writer(escape(name))
                    __M_writer(u'">\n                            ')
                    # SOURCE LINE 24
                    __M_writer(escape(flash))
                    __M_writer(u'\n                        </div>\n')
                    pass
                pass
            pass
        # SOURCE LINE 29
        __M_writer(u'        </span>\n    </div>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_footer(context):
    context.caller_stack._push_frame()
    try:
        __M_writer = context.writer()
        # SOURCE LINE 10
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_js(context):
    context.caller_stack._push_frame()
    try:
        next = context.get('next', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 12
        __M_writer(u'\n    ')
        # SOURCE LINE 13
        __M_writer(escape(next.js()))
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_title(context):
    context.caller_stack._push_frame()
    try:
        request = context.get('request', UNDEFINED)
        config = context.get('config', UNDEFINED)
        next = context.get('next', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 2
        __M_writer(u'\n')
        # SOURCE LINE 3
        if config['debug']:
            # SOURCE LINE 4
            __M_writer(u'        user operation -\n')
            pass
        # SOURCE LINE 6
        __M_writer(u'    ')
        name=request.environ['PATH_INFO'].split('/')[-1] 
        
        __M_writer(u'\n    ')
        # SOURCE LINE 7
        __M_writer(escape(name))
        __M_writer(u' -\n    ')
        # SOURCE LINE 8
        __M_writer(escape(next.title()))
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


